<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <title>找牛网-店铺简介</title>
    <link rel="shortcut icon" href="favicon.ico"/>
    <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
    <link href="css/main.css" media="all" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="lib/layer_mobile/need/layer.css">
    <link rel="stylesheet" href="css/personalStore.css">
    <style>
        .shopTitle .shopmsg h4 {
            margin-bottom: 18px;
        }
        .msg {
            display: flex;
            margin-top: 10px;
        }
        .msg li {
            width: 25%;
            height: 71px;
            background: #fff;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }
        .msg li span:nth-child(1){
            color: #333333;
            display: inline-block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            max-width: 100%;
        }
        .msg li span:nth-child(2){
            color: #999999;
        }
        .business {
            margin-top: 10px;
            padding: 0 3%;
            background: #fff;
        }
        .business li {
            color: #666;
            border-bottom: 1px solid #e0e0e0;
            display: flex;
            min-height: 45px;
            background: #fff;
            line-height: 45px;
        }
        .business li span {
            text-overflow: ellipsis;
            white-space: nowrap;
            overflow: hidden;
        }
        .business li span:nth-child(1) {
            flex: 1;

        }
        .business li span:nth-child(2) {
            flex: 3;
        }
        .business li span {
            color: #000;
        }
        .discription {
            background: #fff;
            margin-top: 10px;
            display: flex;
            min-height: 45px;
            padding: 0 3% 13px;
        }
        .discription div:nth-child(1){
            flex: 1;
            line-height: 45px;
            color: #000;
        }
        .discription div:nth-child(2){
            line-height: 20px;
            margin-top: 13px;
            flex: 3;
            color: #000;
        }
        .visii {
            visibility: hidden !important;
        }
    </style>
    <!--[if lt IE 9]>
    <script src="lib/html5shiv/html5shiv.min.js"></script>
    <script src="lib/respond/respond.min.js"></script>
    <![endif]-->
</head>

<body>
<header class="header-tab">
    <div>
        <a href="personalStore.html">
                <span>
			        <img src="img/order_left.png" alt="" />
		        </span>
        </a>
        <h5>店铺简介</h5>
    </div>
</header>
<div class="shopTitle">
    <div class='shopImg'><img src="img/user.png" alt=""></div>
    <div class='shopmsg'>
        <h4 class='visi'>北京进出口有限公司</h4>
        <p id='shopState' class='squireBlue'>
            <img src="img/shop/icon-gryrz.png" alt=""><span>个人已认证</span>
        </p>
    </div>
    <div class='shopShare'>
        <img src="img/shop/icon-fx.png" alt="">
        <p>店铺分享</p>
    </div>
</div>
<ul class='msg'>
    <li>
        <span id='successTotal' class='visi'>88</span>
        <span>成功交易</span>
    </li>
    <li>
        <span id="shopHot" class='visi'>888</span>
        <span>找牛热度</span>
    </li>
    <li>
        <span id="shopTotal" class='visi'>888</span>
        <span>商品总数</span>
    </li>
    <li>
        <span id="whereHose"  class='visi'>澳大利亚</span>
        <span>所在地区</span>
    </li>
</ul>
<ul class='business'>
    <li><span>业务种类</span><span id='metype'></span></li>
    <li><span>联系人</span><span id='people'></span></li>
    <li><span>联系方式</span><span id='tel'></span></li>
</ul>
<div class='discription hidden'>
    <div>企业介绍</div>
    <div id='discription'>刷机大师建档立卡时间打撒见</div>
</div>
<div id="sharePage" class="orderPage">
    <div class="shareImg">
        <img src="img/wenzi.png" alt="" />
    </div>
</div>
<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/jquery/fastclick.js" type="text/javascript" charset="utf-8"></script>
<script>
    $(function() {
        FastClick.attach(document.body);
    });
</script>
<script src="js/main.js"></script>
<script src="js/count.js" type="text/javascript" charset="utf-8"></script>
<script src="js/cookie.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/layer_mobile/layer.js"></script>
<script src="js/laymes.js"></script>
<script>
    $(function () {
        var getShopMsg = '/shop/getUserShop',
            logoImg = $('.shopImg img'),
            shopTitle = $('.shopmsg h4'),
            shopState = $('#shopState'),
            shopTotal = $('#shopTotal'),
            shopHot = $('#shopHot'),
            successTotal = $('#successTotal'),
            whereHose = $('#whereHose'),
            metype = $('#metype'),
            people = $('#people'),
            tel = $('#tel'),
            discription = $('#discription');
        $('.header-tab a').attr('href', 'personalStore.html?id=' + getQueryString('id'))
        $('.shopShare').on('click', function () {
            $('#sharePage').show()
        })
        // 分享
        $('#sharePage').on('click', function () {
            $('#sharePage').hide()
        })
        $.ajax({
            url:host + getShopMsg,
            data:'uuid='+getQueryString('id'),
            success: function (data) {
                var data = data.data;
                data.shopLogo = data.shopLogo || 'img/user.png'
                if(data.authenticationStatus !== 1 && data.auditStatus == 2){

                    shopState.html('<img src="img/shop/icon-qyyrz.png" alt=""><span style="">企业已认证</span>');
                }
                logoImg.attr('src', data.shopLogo)
                shopTitle.text(data.shopName)
                shopTotal.text(data.provideNum || 0)
                shopHot.text(data.zhaoNiuReport || 0)
                successTotal.text(data.successfulTradeNum || 0  )

                metype.text(data.businessType === 3?'牛产品，羊产品':data.businessType===1?'牛产品':'羊产品')
                if(data.enterpriseIdentity && data.auditStatus != 3){
                    whereHose.text(data.enterpriseIdentity.address.split('市')[0] + '市')
                    people.text(data.enterpriseIdentity.enterpriseName)
                    tel.text(data.enterpriseIdentity.phone)
                    discription.text(data.enterpriseIdentity.companyProfile)
                    $('.discription').removeClass('hidden')
                }else {
                    whereHose.text(data.userIdentity.address)
                    people.text(data.userIdentity.identityName)
                    tel.text(data.userIdentity.phone)
                }
                $('.visi').removeClass('visi')
            },
            error: function (data) {
                console.log(data)
            }
        })
    })
</script>
</body>

</html>